package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Objects;

/***
 *@ClaseName:TbGoods
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 14:14
 */
@Entity
@Table(name = "tb_goods", schema = "simpleshop", catalog = "")
public class TbGoods {
    private String id;
    private String name;
    private String intro;
    private String detail;
    private String paramters;
    private Integer sale;
    private Integer automatic;
    private Date automaticTime;
    private String brandId;
    private String classifyId;
    private String columnId;
    private Date createTime;
    private Integer isDelete;
    private String pics;
    private Integer sort;
    private String thumbnail;
    private String specInfo;
    private String specId;
    @Basic
    @Column(name = "spec_id")
    public String getSpecId() {
        return specId;
    }
    public void setSpecId(String specId) {
        this.specId = specId;
    }

    @Basic
    @Column(name = "spec_info")
    public String getSpecInfo() {
        return specInfo;
    }

    public void setSpecInfo(String specInfo) {
        this.specInfo = specInfo;
    }

    @Id
    @Column(name = "id")
    public String  getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "intro")
    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    @Basic
    @Column(name = "detail")
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Basic
    @Column(name = "paramters")
    public String getParamters() {
        return paramters;
    }

    public void setParamters(String paramters) {
        this.paramters = paramters;
    }

    @Basic
    @Column(name = "sale")
    public Integer getSale() {
        return sale;
    }

    public void setSale(Integer sale) {
        this.sale = sale;
    }

    @Basic
    @Column(name = "automatic")
    public Integer getAutomatic() {
        return automatic;
    }

    public void setAutomatic(Integer automatic) {
        this.automatic = automatic;
    }

    @Basic
    @Column(name = "automatic_time")
    public Date getAutomaticTime() {
        return automaticTime;
    }

    public void setAutomaticTime(Date automaticTime) {
        this.automaticTime = automaticTime;
    }

    @Basic
    @Column(name = "brand_id")
    public String getBrandId() {
        return brandId;
    }

    public void setBrandId(String brandId) {
        this.brandId = brandId;
    }

    @Basic
    @Column(name = "classify_id")
    public String getClassifyId() {
        return classifyId;
    }

    public void setClassifyId(String classifyId) {
        this.classifyId = classifyId;
    }

    @Basic
    @Column(name = "column_id")
    public String getColumnId() {
        return columnId;
    }

    public void setColumnId(String columnId) {
        this.columnId = columnId;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "pics")
    public String getPics() {
        return pics;
    }

    public void setPics(String pics) {
        this.pics = pics;
    }

    @Basic
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Basic
    @Column(name = "thumbnail")
    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbGoods tbGoods = (TbGoods) o;
        return id == tbGoods.id &&
                Objects.equals(name, tbGoods.name) &&
                Objects.equals(intro, tbGoods.intro) &&
                Objects.equals(detail, tbGoods.detail) &&
                Objects.equals(paramters, tbGoods.paramters) &&
                Objects.equals(sale, tbGoods.sale) &&
                Objects.equals(automatic, tbGoods.automatic) &&
                Objects.equals(automaticTime, tbGoods.automaticTime) &&
                Objects.equals(brandId, tbGoods.brandId) &&
                Objects.equals(classifyId, tbGoods.classifyId) &&
                Objects.equals(columnId, tbGoods.columnId) &&
                Objects.equals(createTime, tbGoods.createTime) &&
                Objects.equals(isDelete, tbGoods.isDelete) &&
                Objects.equals(pics, tbGoods.pics) &&
                Objects.equals(sort, tbGoods.sort) &&
                Objects.equals(thumbnail, tbGoods.thumbnail);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, intro, detail, paramters, sale, automatic, automaticTime, brandId, classifyId, columnId, createTime, isDelete, pics, sort, thumbnail);
    }
}
